from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

# 打开浏览器
driver = webdriver.Chrome()
driver.get('https://fanqienovel.com/')
sleep(2)
# 窗口最大化
driver.maximize_window()
sleep(2)
# 点击登录
driver.find_element(By.XPATH, '/html/body/div[1]/div/div[1]/div/div[2]/div[9]/div/div/div[1]').click()
sleep(2)
# 输入手机号
driver.find_element(By.XPATH, '/html/body/div[1]/div/div/div/div[3]/div[1]/div/div[2]/form/div[1]/div/input').send_keys('15985645480')
# driver.find_element(By.CLASS_NAME, 'username').send_keys('15985645480')
# 强制等待 输入验证码
sleep(10)
# 点击用户协议
driver.find_element(By.CLASS_NAME, 'arco-checkbox-mask').click()
sleep(2)
# 点击登录按钮
driver.find_element(By.XPATH, '//*[@id="slogin-pc-login-form"]/div[2]/form/div[4]/button').click()
sleep(10)
